hf;;get current buffer
(current-buffer)
(get-buffer-create "foo")

(insert-buffer-substring (get-buffer ""))
(list-buffers)
(get-buffer "*scratch*")
(insert-buffer-substring (get-buffer "*scratch*") "abc")



(defun output-tree (path-of-dir name level)
  (if (is-dir path-of-dir)
      (output name level))
  (dolist (file (directory-files path-of-dir))
    (when (and
	 (not (string-match "^\\..*" file))
	 (is-dir (concat path-of-dir "/" file)))
	(output-tree (concat path-of-dir "/" file) file (+ level 2)))))
(require 'cl)
;(require 'cl-macs)
(defun output(str backspace-count)
  (let ((temp-str str)
	(count backspace-count))
    (loop repeat count
	 do (setf temp-str (concat " " temp-str)))
    (message temp-str)))

(output-tree "/home/funny/IdeaProjects" "IdeaProjects" 0)

(output "abc" 2)
(loop for i in '(1 2 3 4)
      do (message "repeat %d" i))
